﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserManage.aspx.cs" Inherits="Admin_UserManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link href="../css/Master.css" rel="Stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="lblTitle" Text="用户管理" runat="server" Style="position: absolute; margin-left: 10px;
            font-family: 微软雅黑; letter-spacing: 5pt; margin-top: 8px; font-size: 16pt; font-weight: bold"></asp:Label>
        <img src="../pics/ReportModule.jpg" style="width: 100%; height: 38px" />
        <table width="100%" border="1" align="center" bordercolorlight="#999999" bordercolordark="#FFFFFF"
            cellspacing="0" cellpadding="2" id="aa">

            <tr bgcolor="#FFFFFF">
                <td style="font: 12; width: 15%">
                    <div align="right">
                    选择角色
                </td>
                <td style="width: 25%">
                    <div align="left">
                        <asp:DropDownList ID="dropRoleSelect" runat="server" Width="205px" AutoPostBack="True"
                            OnSelectedIndexChanged="dropRoleSelect_SelectedIndexChanged">
                        </asp:DropDownList>
                    </div>
                </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td style="font: 12">
                    <div align="right">
                    用户&nbsp;&nbsp;名
                </td>
                <td>
                    <div align="left">
                        <asp:TextBox ID="textUserName" runat="server" Width="200px"></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequiredFieldValidator1" runat="server" ErrorMessage="用户名不能为空" ControlToValidate="textUserName"></asp:RequiredFieldValidator></div>
                </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td colspan="4">
                    <p style="float: right; margin-right: 100px">
                        <asp:Button ID="btnSure" runat="server" Text="添&nbsp;&nbsp;加" OnClick="btnSure_Click" />
                        &nbsp;
                        <asp:Button ID="btnCancel" runat="server" Text="取&nbsp;&nbsp;消" CausesValidation="False"
                            OnClick="btnCancel_Click" /></p></td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td style="font: 12; text-align:center" colspan="2" >
                    <asp:GridView ID="gridUserList" runat="server" AutoGenerateColumns="False" Width="100%"
                        CssClass="grid" CellPadding="4" DataKeyNames="id_key" ForeColor="#333333" GridLines="None"
                        OnRowDeleting="gridUserList_RowDeleting" OnSelectedIndexChanging="gridUserList_SelectedIndexChanging">
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="id_key" HeaderText="编号" />
                            <asp:BoundField DataField="user_name" HeaderText="用户名" />
                            <asp:TemplateField HeaderText="所属角色">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# ConverToRoleName(Eval(" ROLE_ID_KEY ").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField  HeaderText="操作" SelectText="&lt;div id=&quot;de&quot; onclick=&quot;JavaScript:return confirm('一旦重置原先密码将不可使用，请谨慎重置！')&quot;&gt;重置密码&lt;/div&gt;"
                                ShowSelectButton="True" />
                            <asp:CommandField HeaderText="操作" DeleteText="&lt;div id=&quot;de&quot; onclick=&quot;JavaScript:return confirm('一旦删除将无法恢复，请谨慎删除！')&quot;&gt;删除用户 &lt;/div&gt;"
                                ShowDeleteButton="True" />
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
